#pragma once

#include <functional>

typedef std::function<int(int, int)> func;

class Calculator
{
public:
    Calculator(){}

    Calculator(int x, int y, func fun)
        : _x(x)
        , _y(y)
        , _fun(fun)
    {}

    int operator()()
    {
        return _fun(_x, _y);
    }

public:
    int _x;
    int _y;
    func _fun;
};